# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-tokenizers
pkgver=0.12.1
pkgrel=0
pkgdesc="Fast State-of-the-Art Tokenizers optimized for Research and Production"
url="https://github.com/huggingface/tokenizers"
arch="all !s390x !riscv64" # blocked by rust
license="Apache-2.0"
depends="python3"
makedepends="
	cargo
	openssl-dev
	py3-setuptools
	py3-setuptools-rust
	"
source="https://github.com/huggingface/tokenizers/archive/refs/tags/python-v$pkgver/py3-tokenizers-$pkgver.tar.gz"
builddir="$srcdir/tokenizers-python-v$pkgver/bindings/python"
options="!check" # requires pulling test data

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
52ad908afd85eb364ee9589bd0aef6ec9b8e3a0d15bd69ac2214749b30549a835a0ded40ba5c6ec9066ce4d5d4eb9e011d94006aaa8aa72e42b0487969e77c96  py3-tokenizers-0.12.1.tar.gz
"
